package com.guigu.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.guigu.DeskOrderService;
import com.guigu.mapper.DeskOrderMapper;
import com.guigu.pojo.Order;
import com.guigu.vo.DeskOrderList;
import com.guigu.vo.DeskOrderVo;
import com.guigu.vo.OrderDetailsList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeskOrderServiceImpl implements DeskOrderService{
    @Autowired
    private DeskOrderMapper orderMapper;
    @Override
    public PageInfo<DeskOrderList> selectAll1(DeskOrderVo vo, int pageNo, int pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<DeskOrderList> orders = orderMapper.selectAll1(vo);
        PageInfo<DeskOrderList> orderPageInfo = new PageInfo<>(orders);
        return orderPageInfo;
    }

    @Override
    public List<OrderDetailsList> selectParentId(int id) {
        return orderMapper.selectParentId(id);
    }
}
